import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import vueDevTools from 'vite-plugin-vue-devtools'
import VuePluginSetupExtend from 'vite-plugin-vue-setup-extend'
import {resolve} from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), vueJsx(), vueDevTools(), VuePluginSetupExtend()],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url)),
      '@formula/editor': resolve(__dirname, './src/packages/editor/src/index'),
      '@formula/engine': resolve(__dirname, './src/packages/engine/src/index'),
    }
  }
})
